Skip to main content

Overview

Theme Configuration

Library theme configuration is done by passing parameters into the Compose function DxChartsTheme. The function takes the following parameters:

NameParameter nameParameter ClassDefault implementationDescription
Typographytypographycom.devexperts.dxcharts.lib.ui.theme.DxChartsTypographycom.devexperts.dxcharts.lib.ui.theme.DxChartsTypographyFonts' types, styles, sizes
Top Bar IconstopBarIconscom.devexperts.dxcharts.lib.ui.theme.icons.TopBarIconscom.devexperts.dxcharts.lib.ui.theme.icons.DefaultTopBarIconsIcons used in top bars
Toolbar IconstoolbarIconscom.devexperts.dxcharts.lib.ui.theme.icons.ToolbarIconscom.devexperts.dxcharts.lib.ui.theme.icons.DefaultToolbarIconsIcons used in toolbars
Studies IconsstudiesIconscom.devexperts.dxcharts.lib.ui.theme.icons.StudiesIconscom.devexperts.dxcharts.lib.ui.theme.icons.DefaultStudiesIconsIcons used on screens related to indicators
Shapesshapescom.devexperts.dxcharts.lib.ui.theme.DxChartsShapescom.devexperts.dxcharts.lib.ui.theme.DxChartsShapesParameters for the rounding of UI elements
Dimensionsdimensionscom.devexperts.dxcharts.lib.ui.theme.DxChartDimensionscom.devexperts.dxcharts.lib.ui.theme.DxChartDimensionsPaddings, margins, sizes
Common IconscommonIconscom.devexperts.dxcharts.lib.ui.theme.icons.CommonIconscom.devexperts.dxcharts.lib.ui.theme.icons.DefaultCommonIconsCommon library's icons

And the last parameter of the function is content: @Composable () -> Unit - Compose function to which the theme will be applied. When you use DxCharts library, this should be the function com.devexperts.dxcharts.lib.ui.DxChartsScreen.

//...
DxChartsTheme(/* overriden parameters of default */) {
DxChartsScreen(
/* overriden parameters of default */
)
}
//...

Within the DxCharts library, parameters are passed using CompositionLocalProvider, so the construction described above is essential for the library to function.